package com.xia.service.impl;

import com.xia.dao.StudentDao;
import com.xia.dao.impl.StudentDaoImpl;
import com.xia.entity.Student;
import com.xia.service.StudentService;

import java.util.List;

public class StudentServiceImpl implements StudentService {
    StudentDao studentDao = new StudentDaoImpl();
    @Override
    public List<Student> selectAll() {
        return studentDao.selectAll();
    }


    @Override
    public boolean deleteStudent(Integer sid) {
        int count = studentDao.deleteStudent(sid);
        if (count>=0){
            return true;
        }
        return false;
    }

    @Override
    public boolean updateStudent(Student student) {
        int count = studentDao.deleteStudent(student);
        if (count>=0){
            return true;
        }
        return false;
    }
}
